import { template } from "../../../shared/master/MsgAction";
import { _Cls_Points } from "./att/_Points";
import { CreateBody_base, baseBody } from "./baseBody";
import { player } from "./player";
export interface CreateBody_calls extends CreateBody_base {

}
/**
 * 永久类召唤物
 */
export class calls extends baseBody {
    icon: string = '🦖';
    private _parent?: baseBody;
    constructor() {
        super()
        this.setBodyType('calls')
    }

    get_Master():baseBody{
        return this._parent || this;
    }
    setMaster(tag: baseBody) {
        this._parent = tag;
    }
    async sendMsg(tel: template, data?: any) {
        if (!(this._parent instanceof player)) {
            return;
        }
        switch (tel) {
            case template.default:
                data = `[召唤物]${data}`
                break;

            default:
                break;
        }
        this._parent.sendMsg(tel, data)
    }
    getBag(){
        if (!(this._parent instanceof player)) {
            return;
        }
        return this._parent.getBag()
    }
 
}